<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateTableAdmins extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('admin_users', function (Blueprint $table) {
            $table->increments('id');
            $table->string('username',255)->comment('用户名');
            $table->string('password',255)->comment('密码');
            $table->string('name',50)->comment('昵称');
            $table->string('avatar',255)->comment('头像');
            $table->string('remember_token',255);
            $table->string('last_login_ip',255)->comment('最后登录ip');
            $table->string('last_login_time',255)->comment('最后登录时间');
            $table->timestamps();
            $table->comment = '管理员表';
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('admins');
    }
}
